package com.lzy.cloud.consumer.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ConsumerController {

    @Autowired
    com.lzy.cloud.consumer.remote.HelloRemote HelloRemote;

    @RequestMapping("/hello/{name}")
    public String index(@PathVariable("name") String name) {
        return HelloRemote.hello(name);
    }

    @RequestMapping("/say/{what}")
    public String say(@PathVariable("what") String what) {
        return HelloRemote.say(what);
    }

    @RequestMapping("/say2/{what}")
    public String say2(@PathVariable("what") String what) {
        return HelloRemote.say2(what);
    }

}